<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@ include file="/common/taglibs.jsp" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>社会效益</title>
    <%@ include file="/common/util.jsp" %>


    <script src="${cdnctx}/dep/Calendar/WdatePicker.js"></script>
    <script src="${cdnctx}/dep/jquery/modernizr.js"></script>
    <script src="${cdnctx}/dep/jquery/spin.js"></script>
    <style type="text/css">
        #preview {
            margin: 0 20px;
            float: left;
            border-radius: 10px;
        }
    </style>
    <script type="text/javascript">
        function getDefaultDate() {
            var defaultStartDate = '${defaultStartDate}';
            var defaultEndDate = '${defaultEndDate}';
            $('#startDate').val(defaultStartDate);
            $('#endDate').val(defaultEndDate);
        }
    </script>
</head>
<body class="main">
<div class="-frame -style -luster" id="css_container">
    <!--首页框架页眉部分↓-->
    <%@ include file="/WEB-INF/pages/inc/header.jsp" %>
    <!--首页框架页眉部分↑-->

    <div class="content">

        <!-- Left导航菜单◎开始 -->
        <%@ include file="/WEB-INF/pages/inc/leftmenu.jsp" %>
        <!-- Left导航菜单◎结束 -->

        <div class="main-mid">
            <div class="pos"><img src="${cdnctx}/src/index/img/index.png"><a
                    href="${cdnctx}/reductoin/reductoinList.shtml">节能管理 </a>><a>${customername}__社会效益</a>
                <span style="float: right;margin-right: 25px;">
                    <a href="${cdnctx}/economicBenefit/EconomicBenefitscd.shtml?companycode=${companycode }">经济效益</a>
                    | <a href="${cdnctx}/bill/billList.shtml?companycode=${companycode }">账单生成</a> </span>
            </div>
            <div class="css_contentDiv">
                <form id="searchSocialBenefitsForm" action="${cdnctx}/socialBenefits/socialBenefitsList.shtml"
                      method="post">
                    <input type="hidden" name="companycode" value="${companycode }"/>

                    <div style="padding:10px;">
                        <label class="search_text">日期范围：</label>
                        <input type="text" id="startDate" name="startDate" class="search_input Wdate"
                               onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'});" value="${startDate }"/>～<input type="text"
                                                                                                             id="endDate"
                                                                                                             name="endDate"
                                                                                                             class="search_input Wdate"
                                                                                                             onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'});"
                                                                                                             value="${endDate }"/>
                        <input type="submit" id="btnSelect" class="search_btn" value="查&nbsp;询"/>
                        <input type="button" onclick="getDefaultDate()" id="btnResert" class="reset_btn"
                               value="重&nbsp;置"/>
                    </div>
                </form>

                <div class="divTable">
                    <div style="height:680px;background-color:white">
                        <table width="100%" class="list_table">
                            <thead>
                            <tr>
                                <td rowspan="2">耗能项目</td>
                                <td colspan="3">传统灯具</td>
                                <td colspan="3">LED灯具</td>
                            </tr>
                            <tr>

                                <td>耗电量(kw.h)</td>
                                <td>耗能标准(g)</td>
                                <td>耗能量(t)</td>
                                <td>耗电量(kw.h)</td>
                                <td>耗能标准(g)</td>
                                <td>耗能量(t)</td>
                            </tr>
                            </thead>
                            <c:if test="${empty(energy) }">
                                <tr class="even" align="center" style="color:red">
                                    <td colspan="7" class="no-data" style="height: 300px;"></td>
                                </tr>
                            </c:if>
                            <c:if test="${not empty(energy) }">
                                <c:forEach items="${elecEnergies}" var="entity" varStatus="status">
                                    <tr>
                                        <td>${entity.powername }</td>
                                        <c:if test="${status.index == 0}">
                                            <td rowspan="4"><fmt:formatNumber value="${energy.traPower}"
                                                                              pattern="0.00"/>&nbsp;</td>
                                        </c:if>
                                        <td>${entity.powerstandardvalue}&nbsp;</td>
                                        <td><fmt:formatNumber
                                                value="${energy.traPower*entity.powerstandardvalue/1000000}"
                                                pattern="0.00"/>&nbsp;</td>
                                        <c:if test="${status.index == 0}">
                                            <td rowspan="4"><fmt:formatNumber value="${energy.ledPower}"
                                                                              pattern="0.00"/>&nbsp;</td>
                                        </c:if>
                                        <td>${entity.powerstandardvalue}&nbsp;</td>
                                        <td><fmt:formatNumber
                                                value="${energy.ledPower*entity.powerstandardvalue/1000000}"
                                                pattern="0.00"/>&nbsp;</td>
                                    </tr>
                                </c:forEach>
                            </c:if>
                        </table>
                        <embed src="/animation/背景/背景${propertion}.swf" scale="noborder"
                               width="100%" height="350" style="margin-top: 20px;"
                               type="application/x-shockwave-flash"></embed>
                    </div>

                </div>
            </div>
        </div>
    </div>

    <!--首页框架页尾部分↓-->
    <%@ include file="/WEB-INF/pages/inc/footer.jsp" %>
    <!--首页框架页尾部分↑-->
</div>
</body>
</html>